package huashu.net.complain.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import huashu.net.complain.dao.LitigationTypeDao;
import huashu.net.complain.databean.LitigationTypeDTO;
import huashu.net.complain.entity.LitigationType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LitigationTypeService extends StringPKService<LitigationType> {

    @Autowired
    private LitigationTypeDao dao;

    @Override
    protected BaseDao<LitigationType, String> getDao() {
        return dao;
    }

    //各个诉件类型总数
    public List<LitigationTypeDTO> getAllTypeAmount()
    {
        return dao.getTypeAmount();
    }

    //历年数据类型总数
    public List<LitigationType> getYeartype(String type)
    {
        return dao.getYearType(type);
    }

}
